<template>
	<view class="container">
		<view class="record" v-for="(item, index) in current" :key="index">
			<view class="tab">
				<view class="record_time">
					{{ item.orderTime }}
				</view>
				<view class="status">
					<span :style="{ color: item.status === 0 ? '#00808b' : item.status === 1 ? '#e53928' : 'black' }">
						<span v-if="item.status === 0">正常取液</span>
						<span v-if="item.status === 1">取液中断</span>
					</span>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import $http from "@/ajax/http.js";
	export default {
		data() {
			return {
				current:'',
				userId:'',
				token:'',
			}
		},

		onLoad(options) {
			this.token = wx.getStorageSync('token');
			this.record();
		},
		methods: {
			record(){
				$http.request({
					header:{
						Authorization: this.token,
					},
					url:'/storeuser/my/queryMyWaterRecord',
					method: "GET",
				}).then((res)=>{
					console.log(res,"取液记录");
					this.current = res
					console.log(this.current,"取液记录222");
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	@import '@/common/sass/all/all.scss';

	.record {
		.tab {
			width: 684rpx;
			height: 105rpx;
			background-color: #ffffff;
			border-radius: 20rpx;
			display: flex;
			justify-content: space-around;
			align-items: center;
			margin-top: 12rpx;

			.record_time {
				font-size: 27rpx;
				font-weight: 300;
				color: #727171;
				line-height: 50rpx;
			}

			.status {
				font-size: 29rpx;
				font-weight: 400;
				color: #00818B;
				line-height: 50rpx;
			}
		}
	}
</style>